package com.zwps.biz.controller.http;

import com.zwps.biz.api.model.vo.heating.RealTimeHeatingVO;
import com.zwps.biz.api.model.vo.heating.SelectHeatingHotMapVO;
import com.zwps.biz.api.model.vo.heating.SelectHeatingLocalsVO;
import com.zwps.biz.api.model.vo.heating.SelectHeatingPopulationsVO;
import com.zwps.biz.domain.service.RealTimeHeatingService;
import com.zwps.common.controller.response.message.ResponseDataMessage;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
 * description 获取联通实时热力产品接口数据
 * */
@Tag(name = "获取联通实时热力产品接口数据")
@RequestMapping("brief/real_time_heating")
@RestController
@Validated
public class RealTimeHeatingController {

    @Autowired
    RealTimeHeatingService realTimeHeatingService;


//    @Operation(summary = "获取token")
//    @GetMapping("token")
//    public ResponseDataMessage<String> getToken() {
//        return ResponseDataMessage.data(realTimeHeatingService.getToken());
//    }
//
//    @Operation(summary = "获取地区列表")
//    @GetMapping("locals")
//    public ResponseDataMessage<List<SelectHeatingLocalsVO>> getLocals(@Valid  @NotBlank String token) {
//        return ResponseDataMessage.data(realTimeHeatingService.getLocals(token));
//    }
//    @Operation(summary = "实时人数及画像数据获取")
//    @GetMapping("populations_local_statistics")
//    public ResponseDataMessage<SelectHeatingPopulationsVO> getPopulationsLocalStatistics(@Valid  @NotBlank String token, @Valid  @NotNull  Integer localId) {
//        return ResponseDataMessage.data(realTimeHeatingService.getPopulationsLocalStatistics(token, localId));
//    }
//    @Operation(summary = "网格热力数据获取")
//    @GetMapping("hot_map")
//    public ResponseDataMessage<SelectHeatingHotMapVO> getPopulationsHotmap(@Valid  @NotBlank String token, @Valid  @NotNull Integer localId) {
//        return ResponseDataMessage.data(realTimeHeatingService.getPopulationsHotmap(token, localId));
//    }

      @Operation(summary = "查询最新人口热力数据")
      @GetMapping("{type}")
      public ResponseDataMessage<RealTimeHeatingVO> getPopulationsLocalStatistics(@PathVariable @RequestParam(defaultValue = "2") Integer type) {
          return ResponseDataMessage.data(realTimeHeatingService.getPopulationsLocalStatistics(type));
      }

}
